import request from "@/utils/request";

// 获取列表
export function getAllList(query) {
  return request({
    url: "/investigationGroup/getPage",
    method: "get",
    params: query,
  });
}

// 保存
export function saveData(data) {
  return request({
    url: "/investigationGroup/save",
    method: "post",
    data:data
  });
}

// 修改
export function updateData(data) {
  return request({
    url: "/investigationGroup/update",
    method: "post",
    data:data
  });
}

// 查看
export function getDetail(id) {
  return request({
    url: "/investigationGroup/findById",
    method: "get",
    params:id
  });
}

// 获取创建人信息
export function getCreateInfo(id) {
  return request({
    url: "/investigationGroup/getHeadInfo",
    method: "get",
    params:id
  });
}

//删除
export function del(id) {
  return request({
    url: "/investigationGroup/deleteInvestigationGroup/"+id,
    method: "post",
  });
}

export function getAllListPerson(query) {
    return request({
      url: "/personnelManagement/getPage",
      method: "get",
      params: query,
    });
  }

  export function getListPerson(query) {
    return request({
      url: "/investigationGroup/getPersonnelList",
      method: "get",
      params: query,
    });
  }

  export function getListDriver(query) {
    return request({
      url: "/investigationGroup/getDriverList",
      method: "get",
      params: query,
    });
  }